import { axios } from '@/utils/request'

const api = {
  getSetting: '/plugins/scan-code-pay/index/setting',
  setSetting: '/plugins/scan-code-pay/index/setting',
  getList: '/plugins/scan-code-pay/index/get-list',
  downQr: '/plugins/scan-code-pay/index/down-qr',
  getOrderList: '/plugins/scan-code-pay/order/list',
  sendIntegral: '/plugins/scan-code-pay/order/send-integral',
}

export default api

export function getSetting (parameter) {
  return axios({
    url: api.getSetting,
    method: 'get',
    params: parameter
  })
}
export function setSetting (parameter) {
  return axios({
    url: api.setSetting,
    method: 'post',
    data: parameter
  })
}
export function getList (parameter) {
  return axios({
    url: api.getList,
    method: 'get',
    params: parameter
  })
}

export function downQr (parameter) {
  return axios({
    url: api.downQr,
    method: 'get',
    params: parameter
  })
}

export function getOrderList (parameter) {
  return axios({
    url: api.getOrderList,
    method: 'get',
    params: parameter
  })
}
export function sendIntegral (parameter) {
  return axios({
    url: api.sendIntegral,
    method: 'get',
    params: parameter
  })
}


export function getSettingFacePayprofit () {
  return axios({
    url: '/store/setting-face-pay-profit',
    method: 'get',
  })
}


export function setSettingFacePayprofit (data) {
  return axios({
    url: '/store/setting-face-pay-profit',
    method: 'post',
    data
  })
}